/**
 * 远光ECP平台3.0版本 http://www.ygsoft.com/ Grace [Gris Application Cloud-Computing
 * Extension]
 * Copyright(c) 1998 - 2020 YGSoft.Inc, All Rights Reserved
 * 
 * ecp.component.multipleUpload.js
 * 
 * 面板展现上传控件.
 * 
 * 占位符，例如：<div id="attachmentPanel" style="width: 100%;" data-option='{}'></div>
 * 
 * 
 * 变更版本：
 * Created by zhengxianwei@ygsoft.com 2016-07-25
 */

define(["jquery","ecp.utils","ecp.component.upload"],function(t,e){var n={showPanel:!0},o=function(t,e){t&&0!==t.length&&(this.init(t,e),this.render())};return o.prototype={init:function(e,o){this.control=e,this.option=t.extend(!0,{},n,o)},render:function(){this.upload=this.control.ecpUploader(this.option)},disable:function(){this.getUpload().control.uploadPanel("disable")},enable:function(){this.getUpload().control.uploadPanel("enable")},getUpload:function(){return this.upload},setYwKey:function(t){this.upload.setYwKey(t)},getYwKey:function(){return this.upload.getYwKey()}},function(t){var e=t.fn.multipleUpload;t.fn.multipleUpload=function(e){var n=this;e=e||{};var i=typeof e;if("object"===i){var l=[];return this.each(function(){var n=t.extend({},e,!0),i=new o(t(this),n);this.multipleUpload=i,l.push(i)}),1===l.length&&(l=l[0]),l}if("string"===i){var p=Array.prototype.slice.call(arguments,1);if(o.prototype[e])return o.prototype[e].call(p)}else if(e===!0)return n[0]&&n[0].multipleUpload},t.fn.multipleUpload.Constructor=o,t.fn.multipleUpload.noConflict=function(){return t.fn.multipleUpload=e,this}}(jQuery),o.prototype});